package com.xdb.presistence.table;

import java.util.List;
import java.util.Map;

import com.xdb.logging.LogFactory;
import com.xdb.logging.Logger;
import com.xdb.presistence.metadata.TableMetadata;

public class XDBTableStoreAdapter implements XDBTableStore{
	Logger logger = LogFactory.getLog(XDBTableStoreAdapter.class);
	@Override
	public void create(TableMetadata metatdata) {
		logger.debug(metatdata);
	}

	@Override
	public int drop(String tabName) {
		logger.debug(tabName);
		return 0;
	}

	@Override
	public int truncate(String tabName) {
		logger.debug(tabName);
		return 0;
	}

	@Override
	public int insert(String tabName, XDBTableRow... rows) {
		logger.debug(tabName);
		for (XDBTableRow xdbRecordRow : rows) {
			logger.debug(xdbRecordRow);
		}
		return 0;
	}

	@Override
	public int delete(String tabName, Map<String, String> keywords) {
		logger.debug(tabName);
		for (String name : keywords.keySet()) {
			logger.debug(name + ":" + keywords.get(name));
		}
		return 0;
	}

	@Override
	public int update(String tabName, XDBTableRow... newRows) {
		logger.debug(tabName);
		for (XDBTableRow xdbRecordRow : newRows) {
			logger.debug(xdbRecordRow);
		}
		return 0;
	}

	@Override
	public List<XDBTableRow> select(String tabName, Map<String, String> keywords) {
		logger.debug(tabName);
		for (String name : keywords.keySet()) {
			logger.debug(name + ":" + keywords.get(name));
		}
		return null;
	}

}
